// pages/technician/technician.js
Page({
  /**
   * 页面的初始数据
   */
  data: {
    titleArr:[
      {
        id:'0',
        title:'美发'
      },
      {
        id:'1',
        title:'美颜'
      },
      {
        id: '1',
        title: '美甲'
      },
      {
        id: '1',
        title: '美瞳'
      },
    ],
    ressArr:{},
    isDisplay:'none',
    isReeDisplay:'none',
    SimgUrl: '../../images/xiala.png',
    XimgUrl: '../../images/shangla.png',
    defau: {},
    choice: [
      {
        rid: '0',
        name: '张三',
        ress: '北京朝阳区望京A座8011',
        phone: '15939080226'
      },
      {
        rid: '1',
        name: '李四',
        ress: '北京朝阳区望京A座8012',
        phone: '15939080226'
      },
      {
        rid: '2',
        name: '王二麻子',
        ress: '北京朝阳区望京A座8012',
        phone: '15939080226'
      },
      {
        rid: '3',
        name: '哈哈哈',
        ress: '北京朝阳区望京A座8012',
        phone: '15939080226'
      },
      {
        rid: '3',
        name: '哈哈哈',
        ress: '北京朝阳区望京A座8012',
        phone: '15939080226'
      },
      {
        rid: '3',
        name: '哈哈哈',
        ress: '北京朝阳区望京A座8012',
        phone: '15939080226'
      },
      {
        rid: '3',
        name: '哈哈哈',
        ress: '北京朝阳区望京A座8012',
        phone: '15939080226'
      }
    ],
    contentList: [
      {
        id: '0',
        imgUrl: 'http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg',
        title: '秋季特价美甲秋季特价美甲秋季特价美甲秋季特价美甲秋季特价美甲秋季特价美甲',
        price: '188',
        langer: '我们追求卓美我们追求卓美我们追求卓美'
      },
      {
        id: '1',
        imgUrl: 'http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg',
        title: '秋季特价美甲秋季特价美甲秋季特价美甲秋季特价美甲秋季特价美甲秋季特价美甲',
        price: '188',
        langer: '我们追求卓美我们追求卓美我们追求卓美'
      },
      {
        id: '2',
        imgUrl: 'http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg',
        title: '秋季特价美甲秋季特价美甲秋季特价美甲秋季特价美甲秋季特价美甲秋季特价美甲',
        price: '188',
        langer: '我们追求卓美我们追求卓美我们追求卓美'
      },
      {
        id: '2',
        imgUrl: 'http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg',
        title: '秋季特价美甲秋季特价美甲秋季特价美甲秋季特价美甲秋季特价美甲秋季特价美甲',
        price: '188',
        langer: '我们追求卓美我们追求卓美我们追求卓美'
      },
      {
        id: '2',
        imgUrl: 'http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg',
        title: '秋季特价美甲秋季特价美甲秋季特价美甲秋季特价美甲秋季特价美甲秋季特价美甲',
        price: '188',
        langer: '我们追求卓美我们追求卓美我们追求卓美'
      },
      {
        id: '2',
        imgUrl: 'http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg',
        title: '秋季特价美甲秋季特价美甲秋季特价美甲秋季特价美甲秋季特价美甲秋季特价美甲',
        price: '188',
        langer: '我们追求卓美我们追求卓美我们追求卓美'
      }
    ],
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    this.setData({
      ressArr: this.data.titleArr[0],
      defau: this.data.choice[0]
    })
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  },
  onDisplay:function(e){
    console.log(e)
    if(this.data.isDisplay == 'none'){
      this.setData({
        isDisplay:'block'
      })
    }else{
      this.setData({
        isDisplay: 'none'
      })
    }
  },
  onChoice:function(e){
    this.setData({
      ressArr: e.currentTarget.dataset,
      isDisplay: 'none',
    })
  },
  onReeDisplay:function(e){
    console.log(e)
    if (this.data.isReeDisplay == 'none') {
      this.setData({
        isReeDisplay: 'block'
      })
    } else {
      this.setData({
        isReeDisplay: 'none'
      })
    }
  },
  onRessChoice: function (e) {
    // console.log(e.currentTarget.dataset)
    this.setData({
      defau: e.currentTarget.dataset,
      isReeDisplay: 'none',
    })
  }
})